package cn.iocoder.yudao.module.reading.controller.app.profile.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Pattern;
import jakarta.validation.constraints.Size;
import lombok.Data;

/**
 * 用户信息更新请求 VO
 *
 * @author 李晨
 */
@Schema(description = "用户信息更新请求 VO")
@Data
public class ProfileUpdateReqVO {

    @Schema(description = "头像URL", example = "http://127.0.0.1:9000/reading-app-files/users/avatars/1/avatar.jpg")
    private String avatar;

    @Schema(description = "昵称", requiredMode = Schema.RequiredMode.REQUIRED, example = "新昵称")
    @NotBlank(message = "昵称不能为空")
    @Size(max = 50, message = "昵称长度不能超过50个字符")
    private String nickname;

    // 注释掉手机号字段
    // @Schema(description = "手机号", example = "13812345678")
    // @Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号格式错误")
    // private String phone;

    @Schema(description = "邮箱", example = "newemail@test.com")
    @Email(message = "邮箱格式错误")
    @Size(max = 100, message = "邮箱长度不能超过100个字符")
    private String email;

    @Schema(description = "年龄", example = "7")
    private Integer age;

}
